package com.github.loveshorn.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author ste7en.liu@gmail.com
 * @version 1.0.0
 * @since 2017/7/19
 */
@Controller
@RequestMapping("/demo")
public class DemoController {



    @GetMapping("/show")
    public String show(@RequestParam("username") String username, Model model) {

        model.addAttribute("username", username);
        return "demo";
    }

}
